package com.seadragon.apps.doctorcard.service;

import java.util.List;

import com.seadragon.apps.doctorcard.model.Chat;
import com.seadragon.apps.doctorcard.model.ChatContact;
import com.seadragon.apps.doctorcard.model.Contact;

public interface ChatService {
	Chat save(Contact owner, Contact member);
	void update(Chat chat);
	Chat findById(long id);
	Chat findByUuid(String uuid);
	void remove(Chat chat, Contact contact);
	List<Contact> findAllMembersByChat(Chat chat);
	List<Chat> findChatsByContact(Contact contact);
	boolean isMemberOf(Chat chat, Contact contact);
	boolean isMemberOf(long chatId, Contact contact);
	ChatContact findByChatAndContact(Chat chat, Contact contact);
	int add(Contact reference, Chat chat, Contact contact);
}
